<nz-alert style="margin-bottom: 8px;" nzType="info" nzMessage={{message}}  nzShowIcon></nz-alert>
<nz-card  >
<nz-table #basicTable  style="wordbreak: break-all"
[nzBordered]="true"
          [nzScroll]="{x:'1910px',y:'560px'}"


>

    <thead style="height: 40px">
    <tr>
      <th
          nzLeft="0px" nzWidth="50px"
        style="text-align: center; "
      >
        序列
      </th>
      <th
          nzLeft="50px"  nzWidth="90px"
          style=" text-align: center; "
      >
        103凭证
      </th>
      <th
            nzLeft="140px"  nzWidth="50px"
          style=" text-align: center; "
      >
        箱号
      </th>
      <th
            nzLeft="190px"  nzWidth="90px"
            style=" text-align: center; "
      >
        采购订单号
      </th>
      <th
            nzLeft="280px"  nzWidth="50px"
          style=" text-align: center; "
      >
        项目
      </th>
      <th
            nzLeft="330px"  nzWidth="80px"
            style=" text-align: center; "
      >
        雅瑞物料号
      </th>
      <th    nzWidth="80px"
           style=" text-align: center; "
      >
        供应商物料
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        库存地点
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        送货数量
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        实收数
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        良品数
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        不良品数
      </th>
      <th  nzWidth="80px"
           style=" text-align: center; "
      >
        良品公斤数
      </th>
      <th  nzWidth="80px"
           style=" text-align: center; "
      >
        不良公斤数
      </th>

      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        备注
      </th>

      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        抽检数量
      </th>
      <th  nzWidth="80px"
          style=" text-align: center; "
      >
        不良比例
      </th>
      <th  nzWidth="80px"
          style="  text-align: center; "
      >
        主要不良
      </th>
      <th   nzWidth="80px"
          style=" text-align: center; "
      >
        质检备注
      </th>
      <th   nzWidth="180px"
          style=" text-align: center; "
      >
        检验
      </th>
      <th  nzWidth="90px"
          style="text-align: center; "
      >
        104凭证
      </th>
      <th  nzWidth="80px"
          style="text-align: center; "
      >
        质检员
      </th>
      <th
          style="text-align: center;"
      >
        105凭证
      </th>
    </tr>
    </thead>
    <tbody style="margin-top: 50px">

    <tr *ngFor="let datarow of dataTable; let row = index">
            <td  nzLeft="0px"  nzWidth="50px"  style="text-align: center; ">{{row+1}}</td>

            <td   nzLeft="50px"  nzWidth="85px" style="text-align: center;  ">{{dataTable[row][0]}}</td>

            <td  nzLeft="130px"  nzWidth="50px" style="text-align: center;  " >{{dataTable[row][1]}}</td>

            <td  nzLeft="180px"  nzWidth="80px"
                            style="text-align: center;  ">{{dataTable[row][2]}}</td>

            <td nzLeft="260px"  nzWidth="50px"  style="text-align: center;  ">{{dataTable[row][3]}}</td>

            <td  nzLeft="310px" nzWidth="80px"
                            style="text-align: center;  " >{{dataTable[row][4]}}</td>

            <td  style="text-align: center;  ">{{dataTable[row][5]}}</td>

            <td    style="text-align: center;  " > <input  style="width: 60px"   [(ngModel)]="dataTable[row][6]"  ></td>

            <td   style="text-align: center; ">{{dataTable[row][7]}}</td>

            <td    style="text-align: center;  " >{{ dataTable[row][8]}}  </td>

            <td   style="text-align: center;  " >  <nz-input-number    style="width: 60px"   [(ngModel)]="dataTable[row][9]"  ></nz-input-number></td>

            <td    style="text-align: center; " >    <nz-input-number   style="width: 60px"     [(ngModel)]="dataTable[row][10]"  (ngModelChange)="batchEdit(row)" ></nz-input-number></td>
      <td    style="text-align: center; " >    <nz-input-number   style="width: 60px"     [(ngModel)]="dataTable[row][21]"   ></nz-input-number></td>

      <td    style="text-align: center; " >    <nz-input-number   style="width: 60px"     [(ngModel)]="dataTable[row][20]"  (ngModelChange)="batchEdit(row)" ></nz-input-number></td>

            <td   style="text-align: center;  " ><input   style="width: 60px"  [(ngModel)]="dataTable[row][11]"  ></td>

            <td    style="text-align: center;  "><input   style="width: 60px"  [(ngModel)]="dataTable[row][12]"  ></td>

            <td   style="text-align: center;  " ><input  style="width: 60px"   [(ngModel)]="dataTable[row][13]"  ></td>

            <td   style="text-align: center;  " ><input  style="width: 60px"   [(ngModel)]="dataTable[row][14]"  ></td>

            <td    style="text-align: center;  "><input  style="width: 60px"   [(ngModel)]="dataTable[row][15]"  ></td>

            <td   style="text-align: center;  " >
               <button nz-button type="button" [nzType]="'primary'" class="mx-sm"  [nzLoading]="loading"  (click)="qminput(row,1)">外观</button>
              <button nz-button type="button" [nzType]="'primary'" class="mx-sm"   [nzLoading]="loading" (click)="qminput(row,2)">测试</button>
              <!--<nz-select style="width: 80px;" [(ngModel)]="dataTable[row][16]">-->
                <!--<nz-option nzValue="全检" nzLabel="全检"></nz-option>-->
                <!--<nz-option nzValue="抽检" nzLabel="抽检"></nz-option>-->
              <!--</nz-select>-->
            </td>
            <td   style="text-align: center;  " >{{dataTable[row][17]}}</td>
            <td   style="text-align: center;  ">{{dataTable[row][18]}}</td>
            <td    style="text-align: center;  " >{{dataTable[row][19]}}</td>
        </tr>

    </tbody>
</nz-table>
</nz-card>
<nz-alert *ngIf="qminputs == 1" style="margin-bottom: 8px;" nzType="info" nzMessage={{messageqm}}  nzShowIcon></nz-alert>

<nz-card *ngIf="qminputs == 1">

  <!--<input  readonly="readonly" style="width: 120px"  [(ngModel)]="qmname"  >-->
<!--<label>{{qmname}}</label>-->
  <form nz-form>

    <nz-form-item>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm1 == 1" >{{qmpage.qmname1}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm1 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue1"   name="qmvalue1" ></nz-input-number>
       </nz-form-control>


      <nz-form-label nzSpan="1" *ngIf="qmvis.qm2 == 1" >{{qmpage.qmname2}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm2 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue2"  name="qmvalue2" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm3 == 1" >{{qmpage.qmname3}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm3 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue3"  name="qmvalue3" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm4 == 1" >{{qmpage.qmname4}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm4 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue4"  name="qmvalue4" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm5 == 1" >{{qmpage.qmname5}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm5 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue5"  name="qmvalue5" ></nz-input-number>
      </nz-form-control>



      <nz-form-label nzSpan="1" *ngIf="qmvis.qm6 == 1" >{{qmpage.qmname6}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm6 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue6"   name="qmvalue6" ></nz-input-number>
      </nz-form-control>


      <nz-form-label nzSpan="1" *ngIf="qmvis.qm7 == 1" >{{qmpage.qmname7}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm7 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue7"  name="qmvalue7" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm8 == 1" >{{qmpage.qmname8}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm8 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue8"  name="qmvalue8" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm9 == 1" >{{qmpage.qmname9}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm9 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue9"  name="qmvalue9" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm10 == 1" >{{qmpage.qmname10}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm10 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue10"  name="qmvalue10" ></nz-input-number>
      </nz-form-control>

    </nz-form-item>

    <nz-form-item>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm11 == 1" >{{qmpage.qmname11}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm11 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue11"   name="qmvalue11" ></nz-input-number>
      </nz-form-control>


      <nz-form-label nzSpan="1" *ngIf="qmvis.qm12 == 1" >{{qmpage.qmname12}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm12 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue12"  name="qmvalue12" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm13 == 1" >{{qmpage.qmname13}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm13 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue13"  name="qmvalue13" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm14 == 1" >{{qmpage.qmname14}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm14 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue14"  name="qmvalue14" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm15 == 1" >{{qmpage.qmname15}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm15 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue15"  name="qmvalue15" ></nz-input-number>
      </nz-form-control>



      <nz-form-label nzSpan="1" *ngIf="qmvis.qm16 == 1" >{{qmpage.qmname16}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm16 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue16"   name="qmvalue16" ></nz-input-number>
      </nz-form-control>


      <nz-form-label nzSpan="1" *ngIf="qmvis.qm17 == 1" >{{qmpage.qmname17}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm17 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue17"  name="qmvalue17" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm18 == 1" >{{qmpage.qmname18}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm18 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue18"  name="qmvalue18" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm19 == 1" >{{qmpage.qmname19}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm19 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue19"  name="qmvalue19" ></nz-input-number>
      </nz-form-control>

      <nz-form-label nzSpan="1" *ngIf="qmvis.qm20 == 1" >{{qmpage.qmname20}}</nz-form-label>
      <nz-form-control nzSpan="1" *ngIf="qmvis.qm20 == 1">
        <nz-input-number    style="width: 60px"   [(ngModel)]="qmpage.qmvalue20"  name="qmvalue20" ></nz-input-number>
      </nz-form-control>

    </nz-form-item>


  </form>

  <button nz-button  [nzLoading]="loading"     (click)="saveqm()">{{qmbutton}}</button>



</nz-card>
<nz-alert style="margin-bottom: 8px;" nzType="info" nzMessage={{messagesum}}  nzShowIcon></nz-alert>

<nz-table #sumTable
          nzSize="small"
          nzNoResult=""
          nzBordered
          [nzScroll]="{x:'300px'}"
          class="sku-multiple-table"
          cellpadding="0"
          cellspacing="0">
  <thead>
  <tr>

    <th    nzWidth="80px"
               style="min-width: 80px; max-width: 80px;text-align: center;"
    >
      序列
    </th>


    <th    nzWidth="80px"
               style="min-width: 80px; max-width: 80px;text-align: center;"
    >
      雅瑞物料号
    </th>

    <th    nzWidth="80px"
            style="min-width: 80px; max-width: 80px;text-align: center;"
    >
      数量
    </th>

  </tr>
  </thead>
  <tbody>
  <tr *ngFor="let datarow of dataTablesum; let row = index">
    <td   style="text-align: center; width: 50px;">{{row+1}}</td>
    <td  style="text-align: center; width: 80px;">{{dataTablesum[row][0]}}</td>
    <td  style="text-align: center; width: 80px;">{{dataTablesum[row][1]}}</td>
  </tr>

  </tbody>
</nz-table>


